package com.itetchologyandenglish.home.controller.Page;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class OrdersPageController {
    @RequestMapping("/page/procurement")
    String  procurement(){
        return "procurement";
    }
    @RequestMapping("/orders/cgAddModify")
    ModelAndView cgAddModify(@RequestParam(value = "orderId",required = false) Integer orderId, ModelAndView model){
        model.setViewName("cgAddModify");
        model.getModel().put("orderId",orderId);
        return model;
    }
    @RequestMapping("/orders/purchaseInformation")
    ModelAndView purchaseInformation(Integer orderId,ModelAndView model){
        model.setViewName("purchaseInformation");
        model.getModel().put("orderId",orderId);
        return model;
    }


}
